import axios from "@/utils/request";
import { loginUrl, getCodeUrl, registerUrl, getUserInfoUrl } from "../index";
export function loginRequest<T>(params?: any): Promise<T> {
  return axios.post(loginUrl, params);
}
export function registerRequest<T>(params?: any): Promise<T> {
  return axios.post(registerUrl, params);
}
export function getCodeRequest<T>(params?: any): Promise<T> {
  return axios.get(getCodeUrl, params);
  // {
  //   responseType: "blob", // 指定响应类型为二进制数据
  // }
}

export function getUserInfoRequest<T>(params?: any): Promise<T> {
  return axios.get(getUserInfoUrl, params);
}
